# Makefile

CXX = g++
CXXFLAGS = -std=c++11 -I../include
#LDFLAGS = -L../lib -lrocksdb
LINK =  -rdynamic
LINK += -L../../ -l:librocksdb.a
LINK += -L/usr/local/lib -ldl -lz -lbz2
LINK += -ldl -lpthread
SOURCES = zhaon_test.cpp
OBJECTS = $(SOURCES:.cpp=.o)
TARGET = main

.PHONY: all clean

all: $(TARGET)

$(TARGET): $(OBJECTS) 
	$(CXX) -o $@ $^ $(LDFLAGS) $(LINK)

%.o: %.cpp
	$(CXX) $(CXXFLAGS) -c $< -o $@

clean:
	rm -f $(OBJECTS) $(TARGET)